package com.ruoyi.zhjd.collect.modules.dosage.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.zhjd.collect.modules.dosage.dto.CollectDosageDto;
import com.ruoyi.zhjd.collect.modules.dosage.service.LCollectDosageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 消耗信息
 */
@RestController
@RequestMapping("/collect/dosage")
public class LCollectDosageController {

    @Autowired
    private LCollectDosageService LCollectDosageService;

    /**
     * 分页
     *
     * @param params 查询条件
     * @return Result 分页列表
     */
    @GetMapping("page")
    public R<IPage<CollectDosageDto>> page(@RequestParam Map<String, Object> params) {
        IPage<CollectDosageDto> page = LCollectDosageService.page(params);
        return R.ok(page);
    }
}
